
//
//  ButtonPushMVViewController.m
//  TTMusic
//
//  Created by 马金晖 on 16/4/6.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "ButtonPushMVViewController.h"
#import "TTMusicAVPlayer.h"

@interface ButtonPushMVViewController ()

@property (nonatomic, strong)TTMusicAVPlayer *ttAVPlayer;
@property (nonatomic, strong)AVPlayerLayer *playLayer;

@end

@implementation ButtonPushMVViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
}

-(void)CreatAVPlayer {
    
    self.ttAVPlayer = [TTMusicAVPlayer shareTTMusicAVPlayer];
    
    self.playLayer = [AVPlayerLayer playerLayerWithPlayer:self.ttAVPlayer];
    
    self.playLayer.frame = self.view.frame;
    
    [self.view.layer addSublayer:self.playLayer];
    
//    [self.ttAVPlayer playWithURL:self.url];
    
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
